func go/types.assert
174 uses
go/types (current package)
alias.go#L88: assert(a.targs == nil)
alias.go#L145: assert(rhs != nil)
alias.go#L166: assert(len(targs) > 0)
assignments.go#L31: assert(isTypes2)
assignments.go#L137: assert(isConstType(x.typ))
assignments.go#L305: assert(!(variadic && hasDots))
builtins.go#L327: assert(!isTypeParam(typ))
builtins.go#L477: assert(!isTypeParam(typ))
builtins.go#L959: assert(x.mode != invalid)
builtins.go#L1096: assert(!isUntyped(res))
call.go#L35: assert(T != nil || ix != nil)
call.go#L56: assert(len(targs) == len(xlist))
call.go#L123: assert(got == want)
call.go#L133: assert(check != nil)
call.go#L134: assert(len(targs) == typ.TypeParams().Len())
call.go#L149: assert(inst.TypeParams().Len() == 0) // signature is not generic anymore
call.go#L151: assert(len(xlist) <= len(targs))
call.go#L179: assert(x.mode == value)
call.go#L278: assert(len(targs) == len(xlist))
call.go#L373: assert(n < x.typ.(*Signature).TypeParams().Len())
call.go#L566: assert(len(tparams) == len(targs))
call.go#L602: assert(len(tparams) == len(targs))
call.go#L690: assert(pname.pkg == check.pkg)
call.go#L747: assert(exp.Val() != nil)
check.go#L228: assert(!check.conf._EnableAlias)
check.go#L238: assert(!check.conf._EnableAlias)
check.go#L245: assert(!check.conf._EnableAlias)
check.go#L589: assert(top <= len(check.delayed)) // stack must not have shrunk
const.go#L23: assert(x.mode == constant_)
const.go#L246: assert(v != nil)
const.go#L255: assert(x.mode == constant_)
context.go#L69: assert(ctxt != nil)
context.go#L70: assert(orig != nil)
context.go#L112: assert(inst != nil)
decl.go#L109: assert(obj.Type() == nil)
decl.go#L119: assert(obj.Type() != nil)
decl.go#L171: assert(obj.Type() != nil)
decl.go#L226: assert(obj.color() >= grey)
decl.go#L444: assert(obj.typ == nil)
decl.go#L490: assert(obj.typ == nil)
decl.go#L515: assert(lhs == nil || lhs[0] == obj)
decl.go#L553: assert(obj.typ == nil)
decl.go#L608: assert(rhs != nil)
decl.go#L647: assert(rhs != nil)
decl.go#L691: assert(!check.inTParamList)
decl.go#L768: assert(!check.objMap[obj].tdecl.Assign.IsValid()) // don't use TypeName.IsAlias (requires fully set up object)
decl.go#L777: assert(base.TypeArgs().Len() == 0) // collectMethods should not be called on an instantiated type
decl.go#L790: assert(m.name != "_")
decl.go#L791: assert(mset.insert(m) == nil)
decl.go#L799: assert(m.name != "_")
decl.go#L820: assert(m.name != "_")
decl.go#L821: assert(mset.insert(m) == nil)
decl.go#L846: assert(obj.typ == nil)
decl.go#L849: assert(check.iota == nil)
decl.go#L952: assert(obj.typ != nil)
errors.go#L18: func assert(p bool) {
errors.go#L157: assert(code != 0)
errors.go#L167: assert(check.iota != nil)
errors.go#L286: assert(start <= pos && pos < end)
errsupport.go#L56: assert(alt != sel) // otherwise there is no lookup error
expr.go#L1301: assert(hint != nil)
expr.go#L1350: assert(t.Len() != 1)
gcsizes.go#L17: assert(result >= 1)
gcsizes.go#L54: assert(!isTypeParam(T))
gcsizes.go#L104: assert(isTyped(T))
gcsizes.go#L157: assert(!isTypeParam(T))
index.go#L408: assert(ok)
infer.go#L42: assert(inferred == nil || len(inferred) == len(tparams) && !slices.Contains(inferred, nil))
infer.go#L55: assert(n > 0 && len(targs) <= n)
infer.go#L58: assert(params.Len() == len(args))
infer.go#L359: assert(isTyped(d))
infer.go#L375: assert(targ == nil || inferred[i] == targ)
infer.go#L661: assert(n == 0)
infer.go#L674: assert(under(single.typ) == u)
instantiate.go#L56: assert(len(targs) > 0)
instantiate.go#L64: assert(len(tparams) > 0)
instantiate.go#L104: assert(len(ctxts) > 0)
instantiate.go#L137: assert(expanding == nil) // Alias instances cannot be reached from Named types
instantiate.go#L156: assert(expanding == nil) // function instances cannot be reached from Named types
labels.go#L61: assert(b.gotoTarget(name) == nil)
lookup.go#L213: assert(f.typ != nil)
lookup.go#L243: assert(m.typ != nil)
lookup.go#L561: assert(isInterfacePtr(T))
mono.go#L219: assert(typ.Obj().Pkg() == pkg)
named.go#L187: assert(n.underlying == nil) // n is an unresolved instance
named.go#L188: assert(n.loader == nil) // instances are created by instantiation, in which case n.loader is nil
named.go#L215: assert(n.underlying == nil)
named.go#L216: assert(n.TypeArgs().Len() == 0) // instances are created by instantiation, in which case n.loader is nil
named.go#L262: assert(len(targs) > 0)
named.go#L285: assert(t.inst == nil || t.inst.orig.inst == nil)
named.go#L330: assert(t.inst == nil)
named.go#L365: assert(t.inst != nil) // only instances should have incomplete methods
named.go#L372: assert(len(t.methods) == 0)
named.go#L377: assert(t.inst.ctxt != nil) // we should still have a context remaining from the resolution phase
named.go#L398: assert(origm != nil)
named.go#L454: assert(t.inst == nil)
named.go#L471: assert(samePkg(t.obj.pkg, m.pkg))
named.go#L472: assert(t.inst == nil)
named.go#L643: assert(n.inst.orig.underlying != nil)
named.go#L654: assert(check != nil)
named.go#L666: assert(n == n2)
named.go#L686: assert(old.complete) // otherwise we are copying incomplete data
object.go#L175: func (obj *object) setOrder(order uint32) { assert(order > 0); obj.order_ = order }
object.go#L176: func (obj *object) setColor(color color) { assert(color != white); obj.color_ = color }
object.go#L652: assert(Identical(typ, &emptyInterface))
operand.go#L333: assert(Vp == nil)
range.go#L124: assert(obj.typ == nil)
range.go#L136: assert(i == 0) // at most one iteration variable (rhs[1] == nil or Typ[Invalid] for rangeOverInt)
range.go#L145: assert(obj.typ != nil)
range.go#L171: assert(i == 0) // at most one iteration variable (rhs[1] == nil or Typ[Invalid] for rangeOverInt)
range.go#L240: assert(typ.dir != SendOnly)
range.go#L253: assert(typ.Recv() == nil)
range.go#L274: assert(cb.Recv() == nil)
recording.go#L34: assert(x.expr != nil && typ != nil)
recording.go#L60: assert(x != nil)
recording.go#L61: assert(typ != nil)
recording.go#L66: assert(val != nil)
recording.go#L69: assert(!isValid(typ) || allBasic(typ, IsConstType))
recording.go#L98: assert(x != nil)
recording.go#L99: assert(len(a) == 2)
recording.go#L104: assert(isTyped(t0) && isTyped(t1) && (allBoolean(t1) || t1 == universeError))
recording.go#L108: assert(tv.Type != nil) // should have been recorded already
recording.go#L134: assert(ident != nil)
recording.go#L135: assert(typ != nil)
recording.go#L142: assert(id != nil)
recording.go#L149: assert(id != nil)
recording.go#L150: assert(obj != nil)
recording.go#L157: assert(node != nil)
recording.go#L158: assert(obj != nil)
recording.go#L165: assert(obj != nil && (recv == nil || len(index) > 0))
recording.go#L173: assert(node != nil)
recording.go#L174: assert(scope != nil)
resolver.go#L106: assert(ident.Name == obj.Name())
sizes.go#L55: assert(result >= 1)
sizes.go#L92: assert(!isTypeParam(T))
sizes.go#L170: assert(isTyped(T))
sizes.go#L224: assert(!isTypeParam(T))
sizes.go#L341: assert(x >= 0 && 1 <= a && a <= 8 && a&(a-1) == 0)
stmt.go#L353: assert(T != nil)
stmt.go#L406: assert(T != nil)
stmt.go#L419: assert(scope == check.scope)
subst.go#L21: assert(len(tpars) == len(targs))
subst.go#L32: assert(len(from) == len(to))
subst.go#L59: assert(expanding != nil || ctxt != nil)
subst.go#L204: assert(t.complete) // otherwise we are copying incomplete data
typeset.go#L120: assert(t.typ != nil)
typeset.go#L127: assert(Identical(u, under(u)))
typeset.go#L143: assert(t.typ != nil)
typeset.go#L273: assert(!isTypeParam(typ))
typeset.go#L292: assert(!tset.comparable)
typeset.go#L293: assert(len(tset.methods) == 0)
typeset.go#L336: assert(t.typ != nil)
typeset.go#L347: assert(!comp || terms.isAll()) // comparable invariant
typeset.go#L389: assert(!isTypeParam(t.typ))
typestring.go#L86: assert(ctxt != nil)
typestring.go#L362: assert(w.ctxt != nil)
typestring.go#L479: assert(w.tparams == nil)
typexpr.go#L78: assert(typ != nil)
typexpr.go#L107: assert(x.val != nil)
typexpr.go#L194: assert(isTyped(typ))
typexpr.go#L212: assert(isTyped(typ))
typexpr.go#L422: assert(t == Typ[Invalid])
unify.go#L92: assert(len(tparams) >= len(targs))
unify.go#L226: assert(hx != nil)
unify.go#L242: assert(t != nil)
unify.go#L348: assert(!isTypeParam(y))
unify.go#L452: assert(x != y && Unalias(x) != Unalias(y))
unify.go#L660: assert(!u.enableInterfaceInference || mode&exact != 0) // handled before this switch
unify.go#L758: assert(u.asBoundTypeParam(x) == nil)
union.go#L56: assert(len(blist) == len(tlist)-1)
union.go#L172: assert(!IsInterface(y.typ))
universe.go#L293: assert(obj.color() == black)
validtype.go#L129: assert(t.obj.pkg == check.pkg)
validtype.go#L130: assert(t.Origin().obj.pkg == check.pkg)
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)